<?php
session_start();
include ("../db/dbcontroller.php");
include ("helper_functions.php");
include ("header.php");
echo "<center><h3> --War Buildings-- </h3></center>";


?>

<table width="700px" border="1" cellspacing="0" cellpadding="4" high="600px">
<tr><td colspan="5"><h3>Военные здания</h3></td></tr>
<tr><td><b>Эмблема</b></td><td><b>Название здания</b></td><td><b>Актуальный Уровень</b></td><td><b>Статус</b></td><td><b>Действие</b></td></tr>




<?php 
//if(mysqli_num_rows(mysqli_query($dbc, "SELECT town_hall FROM peace_buildings WHERE townid='$townid'"))){
//	
//}
$query = mysqli_query($dbc, "SELECT shield FROM war_buildings WHERE townid='$townid'");
$query = mysqli_fetch_row($query);
$query = $query[0];
echo "<tr><td>image</td><td>Shield</td><td>Уровень: ".$query."</tr>";

$query = mysqli_query($dbc, "SELECT kasarm FROM war_buildings WHERE townid='$townid'");
$query = mysqli_fetch_row($query);
$query = $query[0];
echo "<tr><td>image</td><td>Kasarm</td><td>Уровень: ".$query."</tr>";

$query = mysqli_query($dbc, "SELECT castle FROM war_buildings WHERE townid='$townid'");
$query = mysqli_fetch_row($query);
$query = $query[0];
echo "<tr><td>image</td><td>Castle</td><td>Уровень: ".$query."</tr>";

$query = mysqli_query($dbc, "SELECT precastle FROM war_buildings WHERE townid='$townid'");
$query = mysqli_fetch_row($query);
$query = $query[0];
echo "<tr><td>image</td><td>Precastle</td><td>Уровень: ".$query."</tr>";

$query = mysqli_query($dbc, "SELECT hiding FROM war_buildings WHERE townid='$townid'");
$query = mysqli_fetch_row($query);
$query = $query[0];
echo "<tr><td>image</td><td>Hiding</td><td>Уровень: ".$query."</tr>";

?>

</table>

<?php
include ("footer.php"); 